function eq = setup_transition_matrices(eq, param,glob,options)
    
    lp          = eq.l;
    fspaceerg   = fundef({'spli',glob.bgridf,0,1});

    lp          = min(lp, glob.maxb);
    lp          = max(lp, glob.minb);
    
    Qb          = funbas(fspaceerg, lp);

    eq.Q           = dprod(glob.Qef,Qb);

    % Distribution of incumbent firms
    L                  = ones(size(eq.Q,1),1);
    eq.L               = L/sum(L);

    % now get the distribution of new entrants
    
    % have productivity distribution 
    % need to get their labor choice!
            
    % create the G matrix by spreading out the entrant productivity
    % arbitrarily across labor choices
    
    G                  = zeros(glob.Nsf,1);
    G(find(glob.sf(:,1) == glob.bgridf(end))) = glob.a_stat_E;
    
    % now, compute entrant policy on the coarser grid
%     v2                  = eq.v2;
%     B                   = [glob.minb*ones(glob.n(2),1), glob.maxb*ones(glob.n(2),1)];
%     obj                 = @(y)valfunc_E(v2, glob.agrid,y,param,glob,options);     
%     y                   = goldenx(obj,B(:,1),B(:,2));
% 
%     [~,ve]                  = valfunc_E(v2, glob.agrid,y,param,glob,options);

    
    entrant_policy = repmat(eq.ve_l, 1, glob.nf(1))';
    entrant_policy = entrant_policy(:)';
    
    entrant_policy          = min(entrant_policy, glob.maxb);
    entrant_policy          = max(entrant_policy, glob.minb);
    
    eq.entrant_policy = entrant_policy;
            
    Qb             = funbas(fspaceerg, entrant_policy');

    % Then apply the policy function
    Qent           = dprod(glob.QeI,Qb);
    eq.G = Qent'*G;

end